﻿using BMS.DTO;
using BMS.Entity.Dictionary;
using BMS.Entity.RBAC;
using BMS.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BMS.IService
{
    public interface IUserService:IBaseService<UserInfo>
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="userName">登录名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        public Task<ResultDTO<LoginSuccessResponseDTO>> UserLogin(string userName, string password);
        ///// <summary>
        ///// 刷新令牌
        ///// </summary>
        ///// <param name="token"></param>
        ///// <returns></returns>
        //public Task<ResultDTO<LoginSuccessResponseDTO>> Refresh(string token);
        /// <summary>
        /// 注册账户
        /// </summary>
        /// <param name="dto">注册信息</param>
        /// <returns></returns>
        public Task<ResultDTO<LoginSuccessResponseDTO>> RegisterAmount(RegisterAmountRequestDTO dto);
        /// <summary>
        /// 找回密码，修改密码
        /// </summary>
        /// <param name="dto">用户名和密码信息</param>
        /// <returns></returns>
        public Task<ResultDTO<int>> UpdatePassword(LoginRequestDTO dto);
        /// <summary>
        /// 用户全部显示及分页查询
        /// </summary>
        /// <returns></returns>
        public Task<ResultDTO<PageDTO<User_PageDTO>>> Page(string UserName,int Pagesize,int Pageindex, int DepartmentId = -1);
        /// <summary>
        /// 添加用户信息及用户-角色信息(管理员可用)
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> AddUser(User_AddDTO entity);
        /// <summary>
        /// 删除用户信息及用户-角色信息 逻辑删 批量删除(只需要删除用户信息，角色信息表不动)
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> DeleteUser(string Ids);
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> UpdateUser(UserEditDTO entity);
        /// <summary>
        /// 给用户分配角色
        /// </summary>
        /// <param name="RoleId">分配的角色ID</param>
        /// <param name="UserId">用户ID</param>
        /// <returns></returns>
        public Task<ResultDTO<string>> AllocationRole(AllocationRoleDTO dto);
        //禁用账户
        //启用账户
        //注销账户信息
    }
}
